<%--
  Created by IntelliJ IDEA.
  User: zwb
  Date: 2022/11/19
  Time: 下午10:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Title</title>
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
</head>
<body>
<form method="post" >
    <label>飞机票查询</label>
    <input type="text" name="id"/>
    <input type="submit" id="sub" value="飞机票查询"/>
</form>
<script>
    $('input[type="submit"]').click(function (){
        var val = $('input[type="text"]').val();
        if (val==null||val==""){
            alert("不能为空")
        }else {
            $("form").attr("action","${pageContext.request.contextPath}/find")
        }
    })
</script>
</body>
</html>
